<?php

namespace Mlym\CodeGeneration\Middleware\Bean\View;

use EasySwoole\Spl\SplBean;
use Mlym\CodeGeneration\Middleware\Bean\View\Validate\ValidateBean;

class ViewColumnBean extends SplBean
{
    protected $module;
    protected $name;
    protected $description;
    protected $type;
    protected $multiple = false;
    protected $search = false;
    protected $rule;
    protected $option;
    protected $validate = [];

    protected function initialize(): void
    {
        foreach ($this->validate as &$item) {
            $item = new ValidateBean($item);
        }
    }

    /**
     * @return mixed
     */
    public function getModule()
    {
        return $this->module;
    }

    /**
     * @param mixed $module
     */
    public function setModule($module): void
    {
        $this->module = $module;
    }

    /**
     * @return mixed
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param mixed $name
     */
    public function setName($name): void
    {
        $this->name = $name;
    }

    /**
     * @return mixed
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * @param mixed $description
     */
    public function setDescription($description): void
    {
        $this->description = $description;
    }

    /**
     * @return mixed
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * @param mixed $type
     */
    public function setType($type): void
    {
        $this->type = $type;
    }

    /**
     * @return mixed
     */
    public function getMultiple()
    {
        return $this->multiple;
    }

    /**
     * @param mixed $multiple
     */
    public function setMultiple($multiple): void
    {
        $this->multiple = $multiple;
    }

    /**
     * @return mixed
     */
    public function getSearch()
    {
        return $this->search;
    }

    /**
     * @param mixed $search
     */
    public function setSearch($search): void
    {
        $this->search = $search;
    }

    /**
     * @return mixed
     */
    public function getRule()
    {
        return $this->rule;
    }

    /**
     * @param mixed $rule
     */
    public function setRule($rule): void
    {
        $this->rule = $rule;
    }

    /**
     * @return mixed
     */
    public function getOption()
    {
        return $this->option;
    }

    /**
     * @param mixed $option
     */
    public function setOption($option): void
    {
        $this->option = $option;
    }

    /**
     * @return array
     */
    public function getValidate(): array
    {
        return $this->validate;
    }

    /**
     * @param array $validate
     */
    public function setValidate(array $validate): void
    {
        $this->validate = $validate;
    }



}